package org.boyan.modules.cgform.converter.bc;

import org.boyan.common.constant.ProvinceCityArea;
import org.boyan.common.util.SpringContextUtils;
import org.boyan.common.util.oConvertUtils;
import org.boyan.modules.cgform.converter.ac.b;
import org.boyan.modules.cgform.entity.OnlCgformField;

public class g extends b {
    ProvinceCityArea c;

    public g(OnlCgformField paramOnlCgformField) {
        this.a = paramOnlCgformField.getDbFieldName();
        this.c = (ProvinceCityArea)SpringContextUtils.getBean(ProvinceCityArea.class);
    }

    public String converterToVal(String txt) {
        if (oConvertUtils.isEmpty(txt))
            return null;
        return this.c.getCode(txt);
    }

    public String converterToTxt(String val) {
        if (oConvertUtils.isEmpty(val))
            return null;
        return this.c.getText(val);
    }
}

